
/**###############################初始化分页工具栏###########################*/
PayMode.pageSizeCombo = Ext.create('configCenter.pageSizeCombo', {
	value : 10,
	listeners : {
		select : function(comboBox) {
			PayMode.pageSize = parseInt(comboBox.getValue());
			PayMode.pageTool.pageSize = parseInt(comboBox.getValue());
			PayMode.dataStore.pageSize = parseInt(comboBox.getValue());
			PayMode.dataStore.load({
				params : {
					start : 0,
					limit : PayMode.pageSize
				}
			});
		}
	}
});

PayMode.pageSizeComboOfHelp = Ext.create('configCenter.pageSizeCombo', {
	value : 10,
	listeners : {
		select : function(comboBox) {
			PayMode.pageSizeOfHelp = parseInt(comboBox.getValue());
			PayMode.pageToolOfHelp.pageSize = parseInt(comboBox.getValue());
			PayMode.helpDataStore.pageSize = parseInt(comboBox.getValue());
			PayMode.helpDataStore.load({
				params : {
					start : 0,
					limit : PayMode.pageSizeOfHelp
				}
			});
		}
	}
});

//获取默认页条数
PayMode.pageSize = parseInt(PayMode.pageSizeCombo.getValue());
PayMode.pageSizeOfHelp = parseInt(PayMode.pageSizeComboOfHelp.getValue());

/**##################################初始化工具栏#################################*/
PayMode.addButton = Ext.create('Ext.Action',{
	text : '新建',
	glyph : 0xf0fe,
	handler : function() {
		PayMode.editWindow.setTitle('新建');
		PayMode.editWindow.show().center();
		PayMode.editPanel.getForm().reset();
	}
});

PayMode.editButton = Ext.create('Ext.Action',{
	text : '编辑',
	glyph : 0xf044,
	handler : function() {
		var row = PayMode.gridPanel.getView().getSelectionModel().getSelection()[0];
		PayMode.editWindow.setTitle('编辑');
		PayMode.editWindow.show().center();
		PayMode.editPanel.getForm().load({
			url : PayMode.searchInfoUrl + row.data.id
		});
	}
});


PayMode.delButton = Ext.create('Ext.Action',{
	text : '删除',
	glyph : 0xf00d,
	handler : function() {
	}
});

PayMode.helpButton = Ext.create('Ext.Action',{
	text : '助手',
	glyph : 0xf25b,
	handler : function() {
		PayMode.helpWindow.setTitle('帮助');
		PayMode.helpWindow.show().center();
		PayMode.helpDataStore.load({
			params : {
				start : 0,
				limit : PayMode.pageSizeOfHelp,
				orderType : "A1+C",
			    payScene : "1",
			    amount : 5000,
			    version : 4000
			}
		});
	}
});
/**###############################定义是否限制订单类型、支持场景、支付金额下拉列表##########################*/
var isShowStore = Ext.create('Ext.data.Store', {
	fields : [ 'value', 'text' ],
	data : PayMode.isCtrl
});

PayMode.isShow = Ext.create('Ext.form.ComboBox', {
	fieldLabel : '是否可用',
	name : 'isShow',
	displayField : 'text',
	valueField : 'value',
	store : isShowStore,
	editable : false,
	anchor : '99%'
});
